home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / keyb / keydef03.zip / KEYDEF.MSG < prev    next >
Text File  |  1993-02-08  |  14KB  |  322 lines

  1. ----------------------------------------------------------------------
  2.  
  3. Date: 1 Jun 90 09:13:00 CST
  4. From: "MBIAN::PERRY" <perry%mbian.decnet@beach.gal.utexas.edu>
  5. Subject: ANSI.SYS questions
  6.  
  7.      I am devising a menu system to be used by the secretaries in my
  8. department. I am using ANSI.SYS to pre-define strings within the
  9. function keys to call the appropriate batch file. I'm sure every one of
  10. you knows the drill.
  11.  
  12. The problem I am having is that this method works for 95% of the
  13. applications. I have prepared a secondary file to reset the function
  14. keys to their initial values. Even after this is done, some of the
  15. applications act strangely as if the function keys were still defined
  16. to some value other than their original value. It appears as though
  17. just by virtue of defining the function keys with ANSI.SYS at all, some
  18. flag somewhere is corrupted and the keys are not being restored to
  19. their boot-up default value.
  20.  
  21. Is there any way the function keys can be TRULY reset to their initial
  22. values? The applications that exhibit this strange behavior are
  23. SIGMAPLOT and SLIDE WRITER PLUS. Any information would be helpful.
  24.  
  25. Thank you in advance.
  26.  
  27.                               John Perry - KG5RG
  28.                               University of Texas Medical Branch
  29.                               The Marine Biomedical Institute
  30.                               200 University Blvd. H-43
  31.                               Galveston, Texas  77550-2772
  32.                               Voice : (409) 761-2124
  33.                               FAX   : (409) 762-9382
  34.  
  35. You can send mail to me at any of the following addresses:
  36.  
  37. DECnet   : MBIAN::PERRY
  38. THEnet   : MBIAN::PERRY
  39. Internet : perry%mbian.decnet@beach.gal.utexas.edu
  40. SPAN     : UTSPAN::UTADNX::MBIAN::PERRY
  41.  
  42. ------------------------------
  43.  
  44. Date: Mon, 25 Jun 90 10:10 MET
  45. From: "Jim Groeneveld, NIPG TNO." <GROENEVELD%TNO.NL@CUNYVM.CUNY.EDU>
  46. Subject: ANSI.SYS questions
  47.  
  48. Dear John Perry,
  49.  
  50. The problem with keyboard redefinition with ANSI.SYS is that the total
  51. amount of the redefinitions may only be a limited number of bytes, 192
  52. I believe.  I don't know whether the keys to be redefined add to that
  53. number themselves.  But if you have a set of definitions (in a file to
  54. be TYPEd to CON, the screen) and you want to reset the keys to their
  55. original values by defining them as themselves, these (re)definitions
  56. add to the total amount even if already redefined keys are redefined
  57. again. The old redefinitions still take space in memory, they are not
  58. removed, though they are not active anymore.
  59.  
  60. Now, if by the second set of redefinitions the total amount of bytes
  61. used in all redefinitions exceeds the limitation of 192 bytes problems
  62. may arise such as that the new redefinitions may not be active, leaving
  63. the old ones active. I presume this might be the problem you are
  64. encountering.
  65.  
  66. This also means that it is not possible to define and redefine keys
  67. unlimitedly as desired. In general it is only possible to use a set of
  68. definitions up to the mentioned limit of bytes and have those
  69. definitions active during a whole session without deactivating or
  70. removing them.
  71.  
  72. I hope this helps you.
  73. Regards - Jim Groeneveld.
  74.  
  75. P.S. I have a (BASIC) program with which one may easily setup a file
  76. with keyboard assignments/redefinitions. If you are interested, drop me
  77. a line.
  78.  
  79. +-----------------------------------------------------------------------------+
  80. | NIPG TNO <work>: Y. Groeneveld (call name: Jim) <home>| GROENEVELD@TNO.NL   |
  81. | Postbus 124    | Wassenaarseweg 56 | Schoolweg 14     | GROENEVELD@HDETNO51 |
  82. | 2300 AC Leiden | 2333 AL Leiden    | 8071 BC Nunspeet | TNOSUR::GROENEVELD  |
  83. | Nederland (NL) : (+31|0)71-178810  | (+31|0)3412-60413| RULTNO::JIM         |
  84. +-----------------------------------------------------------------------------+
  85.  
  86. ------------------------------
  87.  
  88. Date: Mon, 25 Jun 90 17:00:34 MET
  89. From: Ben Salemans <U070011%HNYKUN11.BITNET@CUNYVM.CUNY.EDU>
  90. Subject: Conflicting 'prompt' and 'echo off' commands in BAT-file
  91.  
  92. Hi there,
  93.  
  94. I have developed the following BAT-file (PGUPPGDN.BAT):
  95.  
  96. *----------------------------*
  97. | prompt $e[0;73;"PgUp";13p  |
  98. | prompt $e[0;81;"PgDn";13p  |
  99. | set prompt=                |
  100. *----------------------------*
  101.  
  102. After the execution of this PGUPPGDN.BAT-file, the pushing of the PgUp-
  103. or PgDn-key results in the display of the word 'PgUp' or 'PgDn' on the
  104. screen AND the execution of the PgUp- or PgDn-command, which I have
  105. defined in resp. the PgUp- and PgDn-BAT-files. In the appendix to this
  106. mail you'll find the documented version of this BAT-file.  As you can
  107. see, I use the DOS-prompt command to define these key-strokes.
  108.  
  109. Because I did not want to display the contents of the PGUPPGDN.BAT file
  110. while executing, I simply added the usual 'echo off' line at the top of
  111. the file.
  112.  
  113. *----------------------------*
  114. | echo off                   |
  115. | prompt $e[0;73;"PgUp";13p  |
  116. | prompt $e[0;81;"PgDn";13p  |
  117. | set prompt=                |
  118. *----------------------------*
  119.  
  120. But after adding the 'echo off'-line the BAT-file did not execute well!
  121. I would like to know if any of the IBMPC-L-readers recognizes this
  122. problem and knows how to solve it. I have the impression that the
  123. prompt-command feels the urge to display something on the screen.  When
  124. this is impossible (by the 'echo off'-line) the command does not work.
  125.  
  126. [As you may know, it is next to impossible, if not impossible, to send
  127. the <esc> character (chr$(27)) from the command line to ANSI.SYS.  When
  128. DOS sees $e in the PROMPT command, it sends ESC to ANSI.SYS.  If echo
  129. is OFF, nothing is echoed to the screen, including the ESC character,
  130. so nothing reaches ANSI.SYS...  If you want to use ANSI.SYS to
  131. re-program your keyboard, you'll have to leave echo ON until you finish
  132. re-defining your keys.  gph]
  133.  
  134. Bye!
  135.  
  136. Ben Salemans (u070011@hnykun11)
  137.  
  138. APPENDIX: PGUPPGDN.BAT with annotations in REM-statements
  139. =========================================================
  140.  
  141. REM Ben Salemans, 22-VI-1990
  142. REM --Start-of-definition-of-PgUp-Key-by-using-the-prompt-command------->
  143. REM Pushing the PgUp-Key will result in the display of the string "PgUp"
  144. REM on the screen and the execution of PgUp as a command.
  145. REM Nota bene: '73' is the ASCII-code for the PgUp-key; 13p represents
  146. REM            a strike on the Enter-key.
  147. prompt $e[0;73;"PgUp";13p
  148. REM <------End-of-definition-of-PgUp-Key---------------------------------
  149. REM =====================================================================
  150. REM --Start-of-definition-of-PgDn-Key-by-using-the-prompt-command------->
  151. REM Pushing the PgDn-Key will result in the display of the string "PgDn"
  152. REM on the screen and the execution of PgDn as a command.
  153. REM Nota bene: '81' is the ASCII-code for the PgDn-key; 13p represents
  154. REM            a strike on the Enter-key.
  155. prompt $e[0;81;"PgDn";13p
  156. REM <------End-of-definition-of-PgDn-Key---------------------------------
  157. REM =====================================================================
  158. REM Now we must set the prompt (else there won't be any prompt on the
  159. REM screen)
  160. set prompt=
  161.  
  162. ------------------------------
  163.  
  164. Date: Fri, 20 Jul 90 11:47 MET
  165. From: "Jim Groeneveld, NIPG TNO." <GROENEVELD%TNO.NL@CUNYVM.CUNY.EDU>
  166. Subject: Conflicting 'prompt' and 'echo off' commands in BAT-file
  167.  
  168. Dear Ben <U070011@HNYKUN11>,
  169.  
  170. { I write this reply to you in English instead of Dutch, because I also
  171. will send it to the IBMPC-L digest for general interest. }
  172.  
  173. With regard to your problem concerning "conflicting 'prompt' and 'echo
  174. off' commands in BAT-file" I have the following remarks:
  175.  
  176. 1. Gregory Hicks is right stating within your message that ECHO should
  177. be ON to activate the temporary prompts by displaying them on the
  178. screen.  (Nothing will appear on the screen, however, because the
  179. definitions do not show; they only are 'remembered' when sent to the
  180. screen.)
  181.  
  182. 2. Within your Bat-file you could have ECHO ON just before the PROMPTs
  183. and ECHO OFF right after them.
  184.  
  185. 3. At the end you empty the environment string PROMPT giving